<?php
/* @var $this BeritaController */
/* @var $model Berita */
?>

<div class="judul2" style="padding:3px 15px">
    BERITA
</div>




<div>
    <div style="border-bottom: 1px dotted black;height:auto">
        <div valign="top" style="padding-top:10px;padding:0px 15px;">
            <div style="position: relative;padding-top: 10px;">
                <div style="position:absolute;right:25px;top:0px"><a href="<?=url('site/index')?>"><img
                        src="<?=bu();?>/img/back-icon.png" border="0" alt="back" title="back" style="cursor: pointer;"/></a>
                </div>
                <div class="judul_news"><?=ucwords($model->nama)?></div>
                <div class="content_2 content isi" style="padding-top:10px;">
                    <?php echo $model->isi?>
                </div>
            </div>
        </div>
    </div>
</div>


<div style="padding:3px 15px;width:500px">
    <?php foreach ($model_list as $modelib): ?>

    <div style="position: relative;padding-top: 10px;"><?

        $isi1 = '';

        $tgl = sql2date($modelib['tgl_create'], 'd MMMM yyyy');
        $jawab = '';
        if ($modelib['jawaban'] <> null) {
            $jawab = '<div style="background:#f1f9fd;padding:5px;"><span >Admin :</span><br/>' . $modelib['jawaban'] .
                '</div>';
        } else $jawab = "";
        $isi1 .= '<tr style="background:#fff;padding: 5px;">' .
            '<td valign="top" align="left" class="fontcolorbiru0b5fa5 font12 fontfamcalibry" style="padding: 5px;"><b>' .
            Ucwords($modelib['nama']) . '</b> : <span style="italic fontcolorbiru font10 fontfamcalibry">' . $tgl .
            '</span><br/><span style="fontcolorbiru font10 fontfamcalibry italic">' . $modelib['email'] .
            '</span><br/>' . $modelib['komentar'] . '<br/>' . $jawab . '</td>' . '</tr>';

        echo $isi1;
        ?>
    </div>



    <?php endforeach; ?>

    <div style="position:relative;">
        <?php $this->widget('CLinkPager', array(
        'pages' => $pages,
        'cssFile' => bu() . '/css/pager.css',)) ?>
    </div>
</div>
<div style="padding:3px 15px;width:500px">
    <?php $form = $this->beginWidget('CActiveForm', array(
    'id' => 'bukutamu-artikel-form',
    'enableAjaxValidation' => false,
    'enableClientValidation' => true,
    'clientOptions' => array(
        'validateOnSubmit' => true,),)); ?>
    <?php echo $form->errorSummary($model_komentar);
    echo $form->error($model_komentar, 'verifyCode'); ?>
    <table border="0" cellpadding="0" cellspacing="0" id="id-form">
        <tr>
            <td class="label komentar" valign="top">
                <?php echo $form->textArea($model_komentar, 'komentar',
                array('rows' => 6, 'cols' => 35, 'class' => 'komentar', 'placeholder' => "komentar..."));?>
            </td>
            <td class="label" style="padding-left: 3px;" valign="top">
                <div style="color:red !important;"><?php echo $form->textField($model_komentar, 'nama', array(
                    'size' => 40,
                    'maxlength' => 255,
                    'placeholder' => "nama...",
                    'class' => 'komentar')); ?> </div>
                <div><?php echo $form->textField($model_komentar, 'email', array(
                    'size' => 40,
                    'maxlength' => 255,
                    'placeholder' => "email...",
                    'class' => 'komentar')); ?></div>
                <div> <?php echo $form->textField($model_komentar, 'alamat', array(
                    'size' => 40,
                    'maxlength' => 255,
                    'placeholder' => "website...",
                    'class' => 'komentar'));?></div>
                <div>
                    <?php if (CCaptcha::checkRequirements()): ?>
                    <div style="float:left">
                        <?php $this->widget('CCaptcha', array(
                            'imageOptions' => array('width' => '90px', 'background' => 'black',),
                            'showRefreshButton' => false,
                            'clickableImage' => true)); ?>
                    </div>
                    <div style="float:left">
                        <?php echo $form->textField($model_komentar, 'verifyCode', array(
                        'style' => 'width:100px',
                        'class' => 'login-inpcaptcha',
                        'placeholder' => "ketik captcha...")); ?>
                    </div>
                    <?php endif; ?>
                    <div style="float:left;padding-left:10px">
                    <?php echo  CHtml::imageButton(bu().'/img/sf_submit.png',array('border'=>'0','class'=>'buttoncari')); /*CHtml::submitButton('Submit');*/ ?>
                    </div>                                        
                </div>
            </td>
        </tr>
        <tr>
            <th>&nbsp;</th>
            <td valign="top" class="label fontcolorbiru0b5fa5 font12 fontfamcalibry">
                <!-- submit -->
            </td>
            <td class="label"></td>
        </tr>
    </table>
    <?php $this->endWidget(); ?>
</div>